package com.ruoyi.shop.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单信息对象 order
 *
 * @author ruoyi
 * @date 2022-04-08
 */
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单id */
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String code;

    /** 添加时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addtime;

    /** 订单总价 */
    @Excel(name = "订单总价")
    private String total;

    /** 收货地址id */
    @Excel(name = "收货地址id")
    private Long addressId;

    /** 是否删除   0-未删除    1-已删除 */
    private Integer isdelete;

    /** 订单状态   0-未支付  1-已支付  2-已收货 */
    @Excel(name = "订单状态   0-未支付  1-已支付  2-已收货")
    private Integer status;

    private Address address;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return code;
    }
    public void setAddtime(Date addtime)
    {
        this.addtime = addtime;
    }

    public Date getAddtime()
    {
        return addtime;
    }
    public void setTotal(String total)
    {
        this.total = total;
    }

    public String getTotal()
    {
        return total;
    }
    public void setAddressId(Long addressId)
    {
        this.addressId = addressId;
    }

    public Long getAddressId()
    {
        return addressId;
    }
    public void setIsdelete(Integer isdelete)
    {
        this.isdelete = isdelete;
    }

    public Integer getIsdelete()
    {
        return isdelete;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("code", getCode())
            .append("addtime", getAddtime())
            .append("total", getTotal())
            .append("addressId", getAddressId())
            .append("isdelete", getIsdelete())
            .append("status", getStatus())
            .toString();
    }
}
